import com.hzy.pojo.Books;
import com.hzy.service.BookService;
import org.apache.ibatis.javassist.ClassPath;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
    @Test
    public void test(){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookService bookService = (BookService) applicationContext.getBean("bookService");
        bookService.queryAllBook().forEach(System.out::println);
    }
}
